import com.adobe.cairngorm.control.CairngormEventDispatcher;
import views.ViewInstance;
import net.optix.ip.model.ModelLocator;
import net.optix.ip.vo.CopyrightVO;
import mx.events.ListEvent;

[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();

[Bindable]
private var copyright:CopyrightVO;

private function selectCopyright(event:Event):void
{
	try
	{
		copyright	=	CopyrightVO(event.target.selectedItem);	
		if(event.type == ListEvent.ITEM_DOUBLE_CLICK)
		{
			model.currentCopyright	=	copyright;
			model.oldView	=	ViewInstance.ViewCopyrights;
			
			model.view	=	0;
			model.view	=	ViewInstance.ViewCopyRight;
		}
		else if(event.type == ListEvent.ITEM_CLICK)
		{
			intShow	=	0;
		}
	}
	catch(error:Error)
	{
		trace(error.getStackTrace());
	}
	//trace(model.currentCopyright.copyrightID+"  model.currentCopyright.copyrightID");
}

[Bindable]
private var intShow:int	=	-1;

private function showRecord():void
{
	intShow	=	1;
}

private function showRight():void
{
	intShow	=	0;
}